package com.m3u8;

public class DownloadConstats {

    /**
     * m3u8 及 ts的下载状态
     * ts 只有 10,11,13,15 状态值
     */
    public static class STATE {
        //M3U8状态
        public final static int STATE_M3U8_DEFAULT = 10;
        public final static int STATE_M3U8_DOWNLADING = 11;
        public final static int STATE_M3U8_PAUSE = 12;
        public final static int STATE_M3U8_SUCCESS = 13;
        public final static int STATE_M3U8_WAIT = 14;
        public final static int STATE_M3U8_FAIL = 15;
        public final static int STATE_M3U8_NO_NET = 16;

        //TS状态
        public final static int STATE_TS_DEFAULT = 20;
        public final static int STATE_TS_DOWNLADING = 21;
        public final static int STATE_TS_SUCCESS = 22;
        public final static int STATE_TS_FAIL = 23;
    }


    /**
     * activity和service通信状态
     */
    public static class Request {
        public static final int START = 0x000001; //下载状态
        public static final int PAUSE = 0x0000002; //暂停状态
        public static final int REFRESH = 0x000003; // 刷新
        public static final int RESUME = 0x000004; // 恢复下载
    }

    /**
     * intent传递key
     */
    public static class KEY {
        public static final String SERVICE_INTENT_EXTRA = "service_intent_extra";
        public static final String SERVICE_INTENT_EXTRA_LIST = "service_intent_extra_list";
    }

    /**
     * 数据库设置
     */
    public static class DB {
        public static final String DB_NAME = "download.db";
        public static final int DB_VERSION = 1;
    }

    /**
     * handler事件传递机制
     */
    public static class MSG {
        public static final int MSG_START = 0;
        public static final int MSG_WAIT = 1;
        public static final int MSG_RESUME = 2;
        public static final int MSG_DOWNING = 3;
        public static final int MSG_PAUSE = 4;
        public static final int MSG_FAILER = 5;
        public static final int MSG_SUCCESS = 7;

        public static final int MSG_START_DOWNLOAD = 16;
        public static final int MSG_START_PAUSE = 17;
    }
}
